//import i18n from '@/utils/i18n';
//在router中实现国际化，router 和 i18n 是同级的，所以在router中调用this.$t()会报错,因此meta.title中直接写入语言包json文件字段，调用时采用{{ $t(item.meta.title) }}

const routes = [
  {
    path: '/',
    meta: {
      requiresAuth: true
    },
    component: () => import('@/layouts/AppLayout'),
    children: [
      {
        path: '',
        name: 'overview',
        component: () => import('@/views/Overview/Overview.vue'),
        meta: {
          title: 'appPageTitle.overview'
        }
      },
      {
        path: 'hardware-info/system-info',
        name: 'system-info',
        component: () => import('@/views/HardwareInfo/SystemInfo'),
        meta: {
          title: 'appNavigation.sysInfos'
        }
      },
      {
        path: 'hardware-info/fru-info',
        name: 'fru-info',
        component: () => import('@/views/HardwareInfo/FruInfo'),
        meta: {
          title: 'appNavigation.fru_information'
        }
      },
      {
        path: 'hardware-info/storage',
        name: 'storage',
        component: () => import('@/views/HardwareInfo/Storage'),
        meta: {
          title: 'appNavigation.store'
        }
      },
      {
        path: 'hardware-info/sensors',
        name: 'sensors',
        component: () => import('@/views/HardwareInfo/Sensors'),
        meta: {
          title: 'appPageTitle.sensors'
        }
      },
      {
        path: 'hardware-info/history',
        name: 'history',
        component: () => import('@/views/HardwareInfo/History'),
        meta: {
          title: 'appNavigation.history'
        }
      },
      {
        path: 'hardware-info/fan-control',
        name: 'fan-control',
        component: () => import('@/views/HardwareInfo/Fan'),
        meta: {
          title: 'appNavigation.fanCtr'
        }
      },
      {
        path: 'hardware-info/power-control',
        name: 'power-control',
        component: () => import('@/views/HardwareInfo/PowerControl'),
        meta: {
          title: 'appNavigation.power_control'
        }
      },
      {
        path: 'hardware-info/bios-setting',
        name: 'bios-setting',
        component: () => import('@/views/HardwareInfo/BiosSettings'),
        meta: {
          title: 'appNavigation.boot_options'
        }
      },
      {
        path: 'hardware-info/system-software-info',
        name: 'system-software-info',
        component: () => import('@/views/HardwareInfo/SystemSoftwareInfo'),
        meta: {
          title: 'appNavigation.system_software_info'
        }
      },
      {
        path: 'log-diagnose/ok-log',
        name: 'okclog',
        component: () => import('@/views/Diagnose/OneKeyLog'),
        meta: {
          title: 'appNavigation.okclog'
        }
      },
      {
        path: 'log-diagnose/alarm-log',
        name: 'alarm-log',
        component: () => import('@/views/Diagnose/AlarmLog'),
        meta: {
          title: 'appNavigation.current_alarms'
        }
      },
      {
        path: 'log-diagnose/idl-log',
        name: 'idl-log',
        component: () => import('@/views/Diagnose/IdlLog'),
        meta: {
          title: 'appNavigation.idl_log'
        }
      },
      {
        path: 'log-diagnose/sel-log',
        name: 'sel-log',
        component: () => import('@/views/Diagnose/SelLog'),
        meta: {
          title: 'appNavigation.system_event_log'
        }
      },
      {
        path: 'log-diagnose/audit-log',
        name: 'audit-log',
        component: () => import('@/views/Diagnose/AuditLog'),
        meta: {
          title: 'appNavigation.auditlog'
        }
      },
      {
        path: 'log-diagnose/log-set',
        name: 'alarm-set',
        component: () => import('@/views/Diagnose/LogSetting'),
        meta: {
          title: 'appNavigation.alarm_set'
        }
      },
      {
        path: 'log-diagnose/post-code',
        name: 'post-code',
        component: () => import('@/views/Diagnose/PostCode'),
        meta: {
          title: 'appNavigation.hostpostcode'
        }
      },
      {
        path: 'log-diagnose/capture-screen',
        name: 'capture-screen',
        component: () => import('@/views/Diagnose/CaptureScreen'),
        meta: {
          title: 'appNavigation.capture_screen'
        }
      },
      {
        path: 'log-diagnose/video-log',
        name: 'video-log',
        component: () => import('@/views/Diagnose/VideoLog'),
        meta: {
          title: 'appNavigation.video_log'
        }
      },
      {
        path: 'log-diagnose/restart',
        name: 'restart',
        component: () => import('@/views/Diagnose/Restart'),
        meta: {
          title: 'appNavigation.restart_function'
        }
      },
      {
        path: 'service/kvm',
        name: 'kvm',
        component: () => import('@/views/Service/Kvm'),
        meta: {
          title: 'appNavigation.console_redirection'
        }
      },
      {
        path: 'service/serial-over-lan',
        name: 'serial-over-lan',
        component: () => import('@/views/Service/SerialOverLan'),
        meta: {
          title: 'appNavigation.serialOverLan'
        }
      },
      {
        path: 'service/virtual-media',
        name: 'virtual-media',
        component: () => import('@/views/Service/VirtualMedia'),
        meta: {
          title: 'appNavigation.virtualMedia'
        }
      },
      {
        path: 'service/image-redirection',
        name: 'rmedia',
        component: () => import('@/views/Service/ImageRedirection'),
        meta: {
          title: 'appNavigation.image_redirection'
        }
      },
      {
        path: 'service/snmp-configuration',
        name: 'snmp-configuration',
        component: () => import('@/views/Service/SnmpConfig'),
        meta: {
          title: 'appNavigation.snmp_config'
        }
      },
      {
        path: 'user-security/user-configuration',
        name: 'user-configuration',
        component: () => import('@/views/UserSecurity/UserConfig'),
        meta: {
          title: 'appNavigation.user_detail_config'
        }
      },
      {
        path: 'user-security/double-factor',
        name: 'double-factor',
        component: () => import('@/views/UserSecurity/DoubleFactor'),
        meta: {
          title: 'appNavigation.double_factor'
        }
      },
      {
        path: 'user-security/system-lock',
        name: 'system-lock',
        component: () => import('@/views/UserSecurity/SystemLock'),
        meta: {
          title: 'appNavigation.system_lock'
        }
      },
      {
        path: 'user-security/leakage-action',
        name: 'leakage-action',
        component: () => import('@/views/UserSecurity/LeakageAction'),
        meta: {
          title: 'appNavigation.leakage_action'
        }
      },
      {
        path: 'user-security/metrics-ctl',
        name: 'metrics-ctl',
        component: () => import('@/views/UserSecurity/SecurityMetrics'),
        meta: {
          title: 'appNavigation.security_metrics'
        }
      },
      {
        path: 'user-security/certificate',
        name: 'certificate-fips',
        component: () => import('@/views/UserSecurity/CertificateFpis'),
        meta: {
          title: 'appNavigation.certificate_fips'
        }
      },
      {
        path: 'user-security/license-cert',
        name: 'license-cert',
        component: () => import('@/views/UserSecurity/LicenseCert'),
        meta: {
          title: 'appNavigation.license_cert'
        }
      },
      {
        path: 'user-security/system-firewall',
        name: 'system-firewall',
        component: () => import('@/views/UserSecurity/SystemFirewall'),
        meta: {
          title: 'appNavigation.system_firewall'
        }
      },
      {
        path: 'user-security/external-userservice',
        name: 'external-userservice',
        component: () => import('@/views/UserSecurity/ExternalUserServices'),
        meta: {
          title: 'appNavigation.external_userservice'
        }
      },
      {
        path: 'bmc-settings/language-configuration',
        name: 'language-configuration',
        component: () => import('@/views/Settings/LanguagePack'),
        meta: {
          title: 'appPageTitle.language_configuration'
        }
      },
      {
        path: 'bmc-settings/network',
        name: 'network',
        component: () => import('@/views/Settings/Network'),
        meta: {
          title: 'appNavigation.network'
        }
      },
      {
        path: 'bmc-settings/ports',
        name: 'services',
        component: () => import('@/views/Settings/Ports'),
        meta: {
          title: 'appNavigation.services'
        }
      },
      {
        path: 'bmc-settings/hpm-firmware-update',
        name: 'hpmfirmware',
        component: () => import('@/views/Settings/HPMFirmwareUpdate'),
        meta: {
          title: 'appNavigation.firmware_update'
        }
      },
      {
        path: 'bmc-settings/restore-defaults',
        name: 'restore-defaults',
        component: () => import('@/views/Settings/RestoreDefaults'),
        meta: {
          title: 'appNavigation.restore_defaults'
        }
      },
      {
        path: 'bmc-settings/datetime',
        name: 'datetime',
        component: () => import('@/views/Settings/DateTime'),
        meta: {
          title: 'appNavigation.datetime'
        }
      },
      {
        path: 'bmc-settings/config-upgrade',
        name: 'config-upgrade',
        component: () => import('@/views/Settings/ConfigUpdate'),
        meta: {
          title: 'appNavigation.config_upgrade'
        }
      },
      {
        path: 'bmc-settings/thermal-policy',
        name: 'thermal-policy',
        component: () => import('@/views/Settings/ThermalPolicy'),
        meta: {
          title: 'appNavigation.thermal_policy_config'
        }
      },
      {
        path: 'bmc-settings/upload-logo',
        name: 'upload-logo',
        component: () => import('@/views/Settings/UploadLogo'),
        meta: {
          title: 'appNavigation.upload_logo'
        }
      },
      {
        path: 'bmc-settings/memory-health',
        name: 'memory-health',
        component: () => import('@/views/Settings/MemoryHealth'),
        meta: {
          title: 'appNavigation.memory_health'
        }
      }
    ]
  }
];

export default routes;
